﻿using JetBrains.Annotations;

namespace MugenMvvmToolkit.Interfaces
{
    /// <summary>
    ///     Represents the interface that can handle an event.
    /// </summary>
    public interface IHandler<in TMessage>
    {
        /// <summary>
        ///     Handles the message.
        /// </summary>
        /// <param name="sender">The object that raised the event.</param>
        /// <param name="message">Information about event.</param>
        void Handle([NotNull]object sender, [NotNull] TMessage message);
    }

    /// <summary>
    ///     Represents the interface that can handle an event.
    /// </summary>
    public interface IHandler : IHandler<object>
    {
    }

    /// <summary>
    ///     Represents the message that indicates that any state was changed.
    /// </summary>
    public interface IStateChangedMessage
    {
    }
}